﻿@using lindyaka.Models.Administration
@model lindyaka.Models.Administration.UserAccountRole

@{
    ViewBag.Title = string.Format("Roles: {0}", Model.Email);
    Layout = "~/Areas/Administration/Views/Shared/_Layout.cshtml";
}


<div>
    <h2>@ViewBag.Title</h2>

    <p>
        @Html.ActionLink("Create New", "Create", new {id = Model.UserAccountId})
    </p>
    
    <div class="table-responsive">
        <table class="table">
            <tr>
                <th>
                    @Html.DisplayNameFor(model => model.Roles)
                </th>
                <th></th>
            </tr>

            @foreach (UserAccountRoles item in Model.Roles)
            {
                <tr>
                    <td>
                        @Html.DisplayFor(modelItem => item.RoleName)
                    </td>
                    <td>
                        @Html.ActionLink("Delete", "Delete", new {id = item.UserAccountRoleId})
                    </td>
                </tr>
            }

        </table>
    </div>
    
    <div>
        @Html.ActionLink("Back to List", string.Empty, new {controller = "UserAccounts"}) |
        @Html.ActionLink("Administrative Panel", string.Empty, new {controller = "Panel"})
    </div>

</div>